package com.freemyleft.left.left_app.mian.index.message.adapter;

import com.freemyleft.left.zapp.ui.recycler.DataConverter;
import com.freemyleft.left.zapp.ui.recycler.MultipleFields;
import com.freemyleft.left.zapp.ui.recycler.MultipleItemEntity;


import java.util.ArrayList;

import static com.freemyleft.left.left_app.mian.index.message.adapter.MessageAdapter.MESSAGE_TYPE;

public class MessageConvert extends DataConverter {
    ArrayList<MultipleItemEntity> arrayList = new ArrayList<>();

    @Override
    public ArrayList<MultipleItemEntity> convert() {
        int size = 10;
        for (int i = 0; i < size; i++) {
            String photo = "http://img03.store.sogou.com/app/a/10010016/012348e50b89f64b1eac0385f8f63196";
            String name = "谢老师";
            String messageBody = "老师我考上清华了";
            String date = "8月10日   5：09";
            MultipleItemEntity entity = MultipleItemEntity.builder().
                    setField(MultipleFields.ITEM_TYPE, MESSAGE_TYPE).
                    setField(MessageAdapter.MessageFlies.PHOTO, photo)
                    .setField(MessageAdapter.MessageFlies.NAME, name)
                    .setField(MessageAdapter.MessageFlies.MESSAGE, messageBody)
                    .setField(MessageAdapter.MessageFlies.DATE, date).build();
            arrayList.add(entity);
        }
        return arrayList;
    }
}
